﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;

namespace vw08_equest.Areas.Administrator.Models
{
    [MetadataType(typeof(ExamMetadata))]
    public partial class Exam
    {
        public void Default()
        {
            this.IsDelete = false;
            this.CreatedDate = DateTime.Now;
        }
    }

    public class ExamMetadata
    {
        [Required]
        public string ExamName { get; set; }
        [Required]
        [RegularExpression("([0-9][0-9]*)")]
        public int MaxPoint { get; set; }
        [RegularExpression("([0-9][0-9]*)")]
        public int HardQuestion { get; set; }
        [RegularExpression("([0-9][0-9]*)")]
        public int MediumQuestion { get; set; }
        [RegularExpression("([0-9][0-9]*)")]
        public int EasyQuestion { get; set; }
        [Required]
        [RegularExpression("([0-9][0-9]*)")]
        public int MaxMinute { get; set; }
    }
}